package net.monkeybros.sbus.model;

import com.neurospeech.wsclient.*;
import org.w3c.dom.*;

public class InfoCoord extends WSObject
{
	
	private Double _x;
	public Double getx(){
		return _x;
	}
	public void setx(Double value){
		_x = value;
	}
	private Double _y;
	public Double gety(){
		return _y;
	}
	public void sety(Double value){
		_y = value;
	}
	
	public static InfoCoord loadFrom(Element root) throws Exception
	{
		if(root==null){
			return null;
		}
		InfoCoord result = new InfoCoord();
		result.load(root);
		return result;
	}
	
	
	protected void load(Element root) throws Exception
	{
		this.setx(WSHelper.getDouble(root,"x",false));
		this.sety(WSHelper.getDouble(root,"y",false));
	}
	
	
	
	public Element toXMLElement(Element root)
	{
		Element e = root.getOwnerDocument().createElement("InfoCoord");
		fillXML(e);
		return e;
	}
	
	public void fillXML(Element e)
	{
		WSHelper.addChild(e,"x",String.valueOf(_x),false);
		WSHelper.addChild(e,"y",String.valueOf(_y),false);
	}
	
}
